1. Field of the Invention
The present invention relates to a peripheral device control system.
2. Description of the Related Art
In recent years, network-enabled printers, copiers, facsimiles, scanners, digital cameras, and devices provided with these multiple functions (peripheral devices) have spread rapidly following improvements in network infrastructure. This has led to cases where it is necessary to have an accurate grasp of the usage, including the state of progress, of a peripheral device. An application that charges according to the number of sheets output by a printer is an example of such a case. A billing application will be given as an exemplary application that charges according to the usage of a peripheral device.
Here, in the case where a high-performance printer such as a laser beam printer (LBP) or a copier is used as an exemplary peripheral device, there exist printing systems in which a billing application charges for printed pages in accordance with the content of notifications related to a print job issued from the printer. The use of a high-performance printer in such printing systems means that the printer can itself monitor the print status of each page and issue appropriate notifications related to a print job according to the print status. Therefore billing can be performed accurately in the application.
On the other hand, a low-performance printer, such as an inkjet printer constituting an exemplary peripheral device is not provided with the notification function related to print jobs. In this case, a printing system has been devised in which notifications related to a print job are issued using the printer driver required for controlling the printer, installed on an information processing apparatus connected to the printer (e.g., see JP 3841023). JP 3841023 discloses that status information of the printer is notified from a notification terminal to an annunciation terminal by acquiring the status information from the notification terminal by polling.
In a printing system that uses such a low-performance printer, the status of a print job is monitored using a ReadPort function constituting a 4-second periodical interrupt function, for example. The status of a print job can also be obtained when writing is performed using a WritePort function or the like. However, the following problems occur since monitoring of the job status is performed by polling and is not always synchronized with the progress of the printing process.
(1) The information processing apparatus may be unable to monitor the print status of pages with little print data, for example, and will be unable to issue “Printing” or “Printed” notifications for pages that could not be monitored. Shared information is information managed by a language monitor (discussed below), and includes the status of the printer such as, for example, print progress information, or in other words, the job status. In the case where write and read functions are executed, however, the language monitor acquires the job status from the printer, and if there is a change in the status, the language monitor returns the job status to the function caller as notification information (also referred to as job information). Therefore, even assuming that the job status changes a plurality of times between two functions in close proximity to one another, the value of that job status will be notified to the function caller as if there was only one change from the status captured by the first function to the status captured by the subsequent function.
For example, assume that a ReadPort function for reading the job status from the shared information is executed every four seconds. If the printing of a certain page starts and ends between the processing of the two ReadPort functions, neither a print start notification (“Printing” notification) nor a print end notification (“Printed” notification) will be issued for that page.
(2) When a print job is canceled by the operator, a “Canceled” notification is issued before the “Printing” or “Printed” notifications of pages with respect to which printing has normally started or ended. Therefore, the order of notifications related to the print job will be inaccurate. For example, assume that after the printing of a certain page P has ended and the printing of the next page Q has started, printing is canceled before the “Printed” notification of page P and the “Printing” notification of page Q are issued. In this case, cancel information is set using a WritePort function for instructing cancellation, and a “Canceled” notification is issued to the WritePort function. The “Printed” notification of page P and the “Printing” notification of page Q are then issued to the ReadPort function subsequently executed. Moreover, the cancel information included in these “Printed” and “Printing” notifications will show “canceled”, despite the printing of these pages having been respectively ended and started prior before the cancellation.
(3) Notifications related to a print job issued by the printer driver may, when received by the application, be received in a different order to the order in which they were issued, due to being affected by processing in the OS or the like.